package com.yuanqi.java.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanqi.java.dto.PurchaseReturnOrderDTO;
import com.yuanqi.java.dto.PurchaseReturnOrderVO;
import com.yuanqi.java.entity.PurchaseReturnOrder;
import com.yuanqi.java.entity.PurchaseReturnOrderAudit;

import java.util.List;

/**
 * 采购退货单Service接口
 */
public interface IPurchaseReturnOrderService {

	/**
	 * 创建退货单
	 */
	Long createReturnOrder(PurchaseReturnOrderDTO dto);

	/**
	 * 提交审核
	 */
	void submitForAudit(Long returnOrderId);

	/**
	 * 删除退货单
	 */
	void deleteReturnOrder(Long returnOrderId);

	/**
	 * 批量删除退货单
	 */
	void batchDeleteReturnOrder(List<Long> returnOrderIds);

	/**
	 * 分页查询退货单
	 */
	IPage<PurchaseReturnOrderVO> getReturnOrderPage(Page<PurchaseReturnOrder> page, Integer status, String returnNo);

	/**
	 * 获取退货单详情
	 */
	PurchaseReturnOrderVO getReturnOrderDetail(Long returnOrderId);

	/**
	 * 审核退货单
	 */
	void auditReturnOrder(Long returnOrderId, Long auditorId, String auditOpinion, Integer auditResult);

	/**
	 * 获取最近一次审核记录
	 */
	PurchaseReturnOrderAudit getLatestAuditRecord(Long returnOrderId);
} 